package com.darwin.darwinBitmapEngine.core
{

	/**
	 * 节点存储类
	 * @author lipi
	 * 
	 */
	public class NodeList implements INodeList
	{
		public function NodeList()
		{
			_nodeList = new Vector.<INode>();
		}
		
		//存储显示对象的列表 
		private var _nodeList:Vector.<INode>;
		
		public function get length():int
		{
			return _nodeList.length;
		}
		
		public function push(node:INode):void
		{
			_nodeList.push(node);
		}
		
		public function splice(startIndex:int,deleteCount:int,item:INode = null):void
		{
			if(item)
			{
				_nodeList.splice(startIndex,deleteCount,item);
			}else{
				_nodeList.splice(startIndex,deleteCount);
			}
		}
			
		public function getNodeAt(index:int):INode
		{
			return _nodeList[index];
		}
		
	}
}